package com.mhkj.revise.professional.controller;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.mhkj.revise.plan.entity.Plan;
import com.mhkj.revise.plan.entity.PlanNode;
import com.mhkj.revise.professional.service.ProfessionalPlanNodeService;
import com.mics.core.common.componet.JsonHandler;
import com.mics.core.common.componet.Pagination;
import com.mics.core.system.base.controller.BaseController;

/**
 * 专项计划节点
 * @author mics
 * @date 2018年8月20日
 * @version 1.0
 */
@Controller
@RequestMapping("/professionalPlanNode")
public class ProfessinalPlanNodeController extends BaseController<Plan>{
	@Resource
	private ProfessionalPlanNodeService professionalPlanNodeService;
	@Resource
	private JsonHandler jsonHandler;
	
	@RequestMapping("/listByPage")
	@ResponseBody
	public void listByPage(HttpServletResponse response, PlanNode planNode, int pageIndex, int pageSize) {
		Pagination<PlanNode> pagination = professionalPlanNodeService.listByPage(planNode, pageIndex, pageSize);
		jsonHandler.sendJsonString(response, true, "获取数据成功", pagination,new String[]{"id","NO","business.typeName","nodeName","nodeProperty.value",
				"completeStandard","deadline","deadlineDesc","beginDate","endDate","remark","companyName","officeName","postName"},
				"id","NO","business","nodeName","nodeProperty","completeStandard","deadline","deadlineDesc","beginDate","endDate","remark","companyName","officeName","postName");
	}

}
